NC data creation method

ABSTRACT

The rotating direction of a spindle is stored in a tool data file storage area (101b) for each and every tool used. 
     Data necessary for creating an NC program are stored in a RAM (105) conversationally using an operator&#39;s panel (108) and graphic display unit (102). Thereafter, a processor (103) creates the NC program using the data stored in the RAM. 
     When a tool used in a predetermined machining process is decided during the creation of the NC program, a tool selection command for selecting the tool is outputted and, in addition thereto, a spindle rotating direction conforming to the selected tool is obtained from the tool data file storage area (101b) and a spindle rotating command for rotating the spindle in said direction is outputted.

BACKGROUND OF THE INVENTION FIELD OF THE INVENTION

This invention relates to a method of creating NC data and, moreparticularly, to an NC data creation method in which the rotatingdirection of a spindle is stored for each and every tool used and aspindle rotating direction command is outputted together with a toolselection instruction.

DESCRIPTION OF THE RELATED ART

As disclosed in the specification of U.S. Pat. No. 4,490,781, automaticprogramming systems are available for creating NC tapes (NC data) from adesign drawing through a simple operation by entering data in aconversational mode using a graphic display screen. With such anautomatic programming system, the necessary data are createdsequentially in accordance with the following steps:

(1) a step of inputting the material of a blank;

(2) a step of inputting the format of the drawing;

(3) a step of inputting the blank profile (chosen from among a cylinder,hollow cylinder and special profile blank) and profile dimensions;

(4) a step of inputting the finished profile and finished profiledimensions;

(5) a step of inputting a machine reference point and turret position;

(6) a step of deciding a machining process;

(7) a step of deciding a tool; and

(8) a step of deciding cutting limits and cutting conditions.

The steps (6) through (8) are repeated until the final finished profileis obtained. The machining processes, the tools used in these machiningprocesses, the cutting conditions and the cutting limits are decidedautomatically. For example, the following is registered in memorybeforehand as a sequence of machining processes for machining acylinder:

(1) end face rough cutting;

(2) outer diameter rough cutting;

(3) end face finishing;

(4) outer diameter finishing;

(5) grooving; and

(6) thread cutting.

Further, for each and every tool, a tool data file is registered whichincludes the name of the machining process in which the tool is used andtool shape data indicative of the tool.

When the cylinder is inputted as the shape of the blank and the finishedprofile is then inputted, the names of the machining processes are readout in the order in which the machining processes were registered andtools which will not interfere with the workpiece are selected, uponconsidering the finished profile and the shapes of the tools, from amongthe tools registered for the machining processes that have been read. Inaddition, a machining area is decided based on the blank profile andfinished profile, and a direction for approaching the chuck (along the-X or -Z axis) is decided as the cutting direction.

When the inputting of all data necessary for creating NC data iscompleted by the foregoing steps, the NC data (an NC tape) are finallycreated in automatic fashion. As for automatically deciding themachining processes, see the, specifications of U.S. Ser. No. 767,264,now U.S. Pat. No. 4,723,203, and International Application No.PCT/JP85/00589. With regard to automatically deciding tools used, seethe specification of U.S. Pat. No. 4,723,203.

In the prior art, spindle rotating direction is treated as beingdependent upon the machining process and is stored beforehand in aparameter storage area. With each new machining process, the rotatingdirection is determined upon referring to the parameter storage area.The NC data are created upon outputting a spindle rotation command (M03for forward rotation and M04 for reverse rotation)) together with a toolselection instruction. More specifically, a corresponding relationshipbetween the machining process and spindle rotating direction (i.e.forward rotation for end face cutting, reverse rotation for outerdiameter cutting, and so forth) is stored as a parameter in theparameter storage area in advance and the NC data are created upondetermining the spindle rotating direction based on the correspondingrelationship.

However, there are right-handed tools and left-handed tools, in whichcase the spindle rotating direction is fixed at either forward rotationor reverse rotation. If left- and right-handed tools are used, aworkpiece cannot be machined unless the spindle is rotated in thedirection decided by the particular tool.

With the prior-art method, however, the direction in which a spindle isrotated is decided in dependence upon the machining process withouttaking the left- and right-handedness of the tools into account. As aresult, left- and right-handed tools cannot be used. If they were used,this would necessitate the subsequent revision of the NC data that havebeen created.

SUMMARY OF THE INVENTION

Accordingly, an object of the present invention is to provide an NC datacreation method through which the direction in which a spindle isrotated can be decided in dependence upon the tool.

The rotating direction of a spindle is stored in a tool data filestorage area for each and every tool used.

Data necessary for creating an NC program are stored in a RAMconversationally using an operator's panel and graphic display unit.Thereafter, a processor creates the NC program using the data stored inthe RAM.

When a tool used in a predetermined machining process is decided duringthe creation of the NC program, a tool selection command for selectingthe tool is outputted and, in addition thereto, a spindle rotatingdirection conforming to the selected tool is obtained from the tool datafile storage area and a spindle rotating command for rotating thespindle in said direction is outputted.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram of an automatic programming system;

FIGS. 2(A)-2(H) are side views of tools of different shapes;

FIGS. 3(A)-3(D) are side views illustrating a method of mounting a toolon a turret; and

FIG. 4 is a flowchart of processing according to the invention.

DESCRIPTION OF THE PREFERRED EMBODIMENT

FIG. 1 is a block diagram of an automatic programming system forpracticing the present invention.

Numeral 101 denotes a non-volatile memory having a storage area 101a inwhich a machining process sequence corresponding to each blank profile(cylinder, hollow cylinder and special profile) is stored in advance, astorage area 101b in which a tool data file (tooling file) is stored inadvance, a storage area 101c in which a material file is stored inadvance, and a storage are 101d in which parameters are stored inadvance. An example of a machining process sequence for a case where theprofile is a cylinder is as follows:

(1) end face rough cutting;

(2) outer diameter rough cutting;

(3) end face finishing;

(4) outer diameter finishing;

(5) grooving; and

(6) threading.

The tool data file includes the following for each and every tool:

(a) the name of a machining process in which the tool is used;

(b) tool shape data;

(c) data for mounting the tool on a turret; and

(d) data indicative of spindle rotating direction for when the tool isused.

FIGS. 2(A)-2(H) are side views of tool shapes. RN denotes tool noseradius, AC cutter angle, AN nose angle, XN, ZN imaginery nose positions,and WN nose width (inclusive of grooving cutting tool). The positivedirection of the cutter angle AC is counterclockwise with a main cutter(the solid line in the drawing) serving as a reference, and the positivedirection of the tool angle AN is clockwise with the main cutter servingas a reference. FIGS. 3(A)-3(D) are side views illustrating the mountingof a tool TL on a turret. The direction of the cutter and where thecutter is attached are inputted by being expressed in terms of amounting angle S and mounting position ZS, XS. The positive direction ofthe mounting angle AS is counterclockwise.

Various parameters are stored in the parameter storage area 101d. Theparameters related to the invention are as follows:

(a) a parameter P_(A) indicating the correspondence between eachmachining process and spindle rotating direction, and

(b) a parameter P_(B) indicating whether spindle rotating direction isdecided in dependence upon the tool or, as in the prior art, independence upon the machining process.

Numeral 102 designates a graphic display unit, 103 a processor, 104 aROM storing a control program, 105 a RAM for storing entered data, theresults of processing and created NC data, 106 an NC data output unitfor delivering created NC data to an external memory medium such aspaper tape or bubble cassette. Numeral 108 denotes an operator's panel.

Overall processing according to the invention will now be described inaccordance with the flowchart shown in FIG. 4.

(a) As in the conventional method, the blank material, format of thedesign drawing, profile and dimensional values of the blank, finishedprofile and its dimensions, part profile (finished profile) and itsdimensions, machine reference point and turret index position areinputted and stored in the RAM 105.

(b) The processor 103 checks whether the prevailing state is that formachining sequence determination. If this is the case, the machiningprocesses, the tools used in the machining process, the cutting areasand the cutting directions are automatically decided. The criterion fortool selection is that a selected tool not interfere with the workpiece,as indicated in U.S. Pat. No. 4,445,182.

(c) When entry of all data necessary for NC data creation is completedby the foregoing steps, NC data (NC tapes) are finally createdautomatically. Specifically, each block of NC data is createdsequentially, the NC data are checked to determine if the data areindicative of program end, NC data creation processing is concluded ifthe data are indicative of program end, and if the data are notindicative of program end, then it is determined whether they form atool selection instruction (steps 101 through 103).

If the NC data do not form a tool selection instruction, then the NCdata are outputted (step 104). If the NC data do form a tool selectioninstruction, then, before the tool selection instruction is outputted,the parameter P_(B) is referred to in order to determine whether thespindle rotating direction is dependent upon the machining process orthe tool (step 105).

If the spindle rotating direction is machining process-dependent, then,as in the prior art, the parameter P_(A) is referred to in order toobtain a spindle rotating direction for the machining process using theselected tool (step 106), and an M-function instruction (M03 for forwardand M04 for reverse) for rotating the spindle in said rotating directionis outputted after the tool selection instruction (T.sub.□□□□) (steps107, 108).

If the spindle rotating direction is tool-dependent, however, the tooldata file of the tool selected by the tool selection instruction isreferred to in order to obtain the spindle rotating direction of thetool (step 109), and an M-function instruction (M03 for forward and M04for reverse) for rotating the spindle in said rotating direction isoutputted after the tool selection instruction (T.sub.□□□□).

Though the foregoing deals with a case where the data indicating whetherthe spindle rotation direction is machining process-dependent ortool-dependent is stored as a parameter, it is permissible to adopt anarrangement in which parameters are eliminated and the spindle rotatingdirection is assummed to be tool-dependent from the start.

In accordance with the present invention, the arrangement is such that aspindle rotating direction for each and every tool used is stored in atool data file and, when NC data are created, a tool selectioninstruction for selecting a predetermined tool and a spindle rotatingcommand for rotating the spindle in a direction commensurate with thetool are outputted. As a result, the rotating direction of a spindle canbe decided in dependence upon the tool, so that the correct spindlerotating direction can be decided even if right- and left-handed toolsare used.

What is claimed is:
 1. A numerical control data creation method throughwhich numerical data are created by previously registering, for each andevery tool, a tool data file including names of machining processesusing the tool and tool shape data indicative of the tools, thendeciding machining processes necessary for obtaining a finished shapeand selecting a predetermined tool from among tools registered as toolsused in the machining processes, said method comprising the steps of:(a)including in the tool data file of each and every tool a tool datarotation direction for that tool; (b) outputting a tool selectioncommand for selecting a predetermined tool, and a command for rotatingthe spindle in a spindle rotating direction conforming to the tool datarotation direction included in the tool data file of the predeterminedtool; and (c) setting, prior to performing step (b), a parameterindicating whether the spindle rotating direction is determined independence upon the machining processes or in dependence upon the toolsused.
 2. The numerical control data creation method according to claim1, wherein said outputting in step (b) includes the steps of:(bi)referring to the parameter to distinguish between machiningprocess-dependence and tool-dependence when outputting the toolselection command; (bii) obtaining the tool data rotation direction ofthe predetermined tool from the tool file in a case where the spindlerotating direction is dependent upon the tools used; and (biii)outputting the spindle rotating command for rotating the spindle in thetool data rotation direction obtained in step (bii), together with thetool selection command.
 3. The numerical control data creation methodaccording to claim 2,further comprising the step of (d) storing, priorto performing step (b), a correspondence table indicating correspondencebetween each of the matching processes and a correspondence tablerotation direction, and wherein said outputting in step (b) furthercomprises the steps of:(biv) obtaining, in a case where the spindlerotating direction is determined in dependence upon the machiningprocesses, the correspondence table rotation direction of a currentmachining process from the correspondence table; and (bv) outputting,together with the tool selection command, the spindle rotating commandfor rotating the spindle in the correspondence table rotation directionobtained in step (biv).
 4. A method of creating numerical control datacomprising the steps of:(a) storing a tool data file for each tool, thetool data file including names of machining processes using the tool,tool shape data and a spindle rotating direction; (b) determining themachining processes necessary for obtaining a finished shape; (c)outputting a tool selection command for selecting one tool from among aplurality of tools used in the machining processes determined in step(b); and (d) outputting a command for rotating the spindle in adirection conforming to the tool selected by the tool selection commandoutput in step (c).